home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIResumableChannel.idl < prev    next >
Text File  |  2006-05-08  |  3KB  |  71 lines

  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License
  6.  * Version 1.1 (the "License"); you may not use this file except in
  7.  * compliance with the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is Bradley Baetz
  18.  * Portions created by the Initial Developer are Copyright (C) 2001, 2002
  19.  * the Initial Developer. All Rights Reserved.
  20.  *
  21.  * Contributor(s): Bradley Baetz <bbaetz@student.usyd.edu.au>
  22.  *
  23.  * Alternatively, the contents of this file may be used under the terms of
  24.  * either the GNU General Public License Version 2 or later (the "GPL"), or 
  25.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  26.  * in which case the provisions of the GPL or the LGPL are applicable instead
  27.  * of those above. If you wish to allow use of your version of this file only
  28.  * under the terms of either the GPL or the LGPL, and not to allow others to
  29.  * use your version of this file under the terms of the MPL, indicate your
  30.  * decision by deleting the provisions above and replace them with the notice
  31.  * and other provisions required by the GPL or the LGPL. If you do not delete
  32.  * the provisions above, a recipient may use your version of this file under
  33.  * the terms of any one of the MPL, the GPL or the LGPL.
  34.  *
  35.  * ***** END LICENSE BLOCK ***** */
  36.  
  37. #include "nsISupports.idl"
  38.  
  39. interface nsIStreamListener;
  40.  
  41. [scriptable, uuid(4ad136fa-83af-4a22-a76e-503642c0f4a8)]
  42. interface nsIResumableChannel : nsISupports {
  43.     /**
  44.      * Prepare this channel for resuming. The request will not start until
  45.      * asyncOpen or open is called. Calling resumeAt after open or asyncOpen
  46.      * has been called has undefined behaviour.
  47.      *
  48.      * @param startPos the starting offset, in bytes, to use to download
  49.      * @param entityID information about the file, to match before obtaining
  50.      *  the file. Pass an empty string to use anything.
  51.      *
  52.      * During OnStartRequest, this channel will have a status of
  53.      *  NS_ERROR_NOT_RESUMABLE if the file cannot be resumed, eg because the
  54.      *  server doesn't support this. This error may occur even if startPos
  55.      *  is 0, so that the front end can warn the user.
  56.      * Similarly, the status of this channel during OnStartRequest may be
  57.      *  NS_ERROR_ENTITY_CHANGED, which indicates that the entity has changed,
  58.      *  as indicated by a changed entityID.
  59.      * In both of these cases, no OnDataAvailable will be called, and
  60.      *  OnStopRequest will immediately follow with the same status code.
  61.      */
  62.     void resumeAt(in unsigned long long startPos,
  63.                   in ACString entityID);
  64.  
  65.     /**
  66.      * The entity id for this URI. Available after OnStartRequest.
  67.      * @throw NS_ERROR_NOT_RESUMABLE if this load is not resumable.
  68.      */
  69.     readonly attribute ACString entityID;
  70. };
  71.